#ifndef COMMON_TIMEZONE_H_
#define COMMON_TIMEZONE_H_
#include <fermat/common/timestamp.h>
#include <string>

namespace fermat {

class  Timezone {
public:

	/*!
	*@return the offset of local time to UTC, in seconds.
	*@note local time = UTC + utcOffset() + dst().
	*/
	static int utcOffset();

	/*!
	*@return the daylight saving time offset in seconds if
	*daylight saving time is in use.
	*@note local time = UTC + utcOffset() + dst().
	*/
	static int dst();
	
	/*!
	*@return true if daylight saving time is in effect for the given time.
	*@note Depending on the operating system
	* platform this might only work reliably for certain
	* date ranges, as the C library's localtime() function
	* is used.
	*/
	static bool isDst(const Timestamp& timestamp);


	/*!
	*@return the time zone differential for the current timezone.
	*@note  The timezone differential is computed as utcOffset() + dst()
	* and is expressed in seconds.
	*/	
	static int tzd();

	/*!
	*@return the timezone name currently in effect.
	*/	
	static std::string name();

	/*!
	*@return the timezone name if not daylight saving time is in effect.
	*/	
	static std::string standardName();

	/*!
	*@return the timezone name if daylight saving time is in effect.	
	*/	
	static std::string dstName();
		
};


} 


#endif 
